import App from './App'
import {
	createPinia
} from 'pinia'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import router from './router'
Vue.config.productionTip = false

Vue.prototype.$mount = function() {
		// 添加路由守卫
		router.beforeEach((to, from, next) => {
			// 执行路由守卫函数
			checkLogin(to, from, next);
		});


		App.mpType = 'app'
		const app = new Vue({
			...App,
			router
		})
		app.$mount()
		// #endif

		// #ifdef VUE3
		import {
			createSSRApp
		} from 'vue'
		export function createApp() {
			const app = createSSRApp(App)
			app.use(createPinia())
			return {
				app
			}
		}
		// #endif